import wsgiref.handlers

from google.appengine.ext import webapp

import weather, ip, temp

def main():
    application = webapp.WSGIApplication([
        (r'/weather/forecast/(.*)', weather.Forecast),
        (r'/weather/latest/(.*)', weather.Latest),
        (r'/weather/history/(.*)', weather.History),
        (r'/ip', ip.Handler),
        (r'/temp', temp.Temp)
    ], debug=True)
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
    main()
